﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ninject;
using Timetable.Base.Entities;
using Timetable.Base.Interfaces.Repositories;
using Timetable.Base.Interfaces.Validators;
using Timetable.Base.Interfaces.Services;

namespace Timetable.Data.Services.DataServices
{
    public class TutorialService : BaseDataService<Tutorial>
    {
        [Inject]
        public IRepository<Tutorial> TutorialRepository { get; set; }

        [Inject]
        public IValidator<Tutorial> TutorialValidator { get; set; }

        public override IQueryable<Tutorial> All()
        {
            return TutorialRepository.Get();
        }

        public override Tutorial GetById(int id)
        {
            return TutorialRepository.GetById(id);
        }

        public override IRepository<Tutorial> Repository
        {
            get { return TutorialRepository; }
        }

        public override IValidator<Tutorial> Validator
        {
            get { return TutorialValidator; }
        }
    }
}
